

public class OrderItem {

	Product product;
	private int quantity;
	
	
	
	public Product getProduct() {
		return getProduct();
		
	}
	public int getQuantity() {
		return quantity;
		
	}
	public void setQuantity(int newQuantity) {
	    quantity = newQuantity;
	}
	
	public double getValue() {
		
		return this.getProduct().getPrice()*this.getQuantity();
		
		
	}
	
	@Override
	public String toString() {
	
		return quantity + " "+this.getProduct().getCode()+" "+this.getProduct().getPrice();
	}
	public OrderItem(Product initialProduct,
            int initialQuantity){
		this.product=initialProduct;
		this.quantity=initialQuantity;
	}


}
